#include <stdio.h>
#include <string.h>

struct student {
    char name[20];
    int id;
    int age;
    int score;
};

void shuru(struct student p[], int n);
void shuchu(struct student s[], int n);

int main(int argc, const char *argv[]) {
    struct student stu[3];
    shuru(stu, 3);
    shuchu(stu, 3);
    return 0;
}

void shuru(struct student *p, int n) {
    int i;
    printf("请输入3个学生的信息：\n");
    printf("姓名  ID  年龄  分数\n");
    for(i = 0; i < n; i++) {
        scanf("%s%d%d%d", p[i].name, &p[i].id, &p[i].age, &p[i].score);
    }
}

void shuchu(struct student s[], int n) {
    int i;
    for(i = 0; i < n; i++) {
        printf("%s %d %d %d\n", s[i].name, s[i].id, s[i].age, s[i].score);
    }
}
